1. Field of the Invention
The invention relates to the field of hardware implemented breakpoints for computer programs, primarily used for analyzing or "debugging" programs.
2. Prior Art
Numerous techniques are used to analyze the performance of computer programs, particularly during their development. This is often referred to as "debugging". The debugging process is recognized as a significant part of the development of a computer program, and in some cases, the time required for debugging exceeds that required to write the program.
One technique used for debugging computer programs is to interrupt the program at predetermined events and then examine, for instance, the contents of registers. One such event is the generation of predetermined addresses which may be references to the computer program or data. When the address generated by the computer matches one of the predetermined addresses, a "breakpoint" occurs. The operation of the computer is interrupted to permit analysis.
One method of providing a breakpoint interrupt is to modify the computer program itself. At certain addresses in the program, the program provides an interrupt. This method is relatively inexpensive, however, it has the disadvantage that breakpoints cannot be set for address references to data.
In another method, hardware external to the computer or microprocessor is used for breakpoint interrupts. This hardware compares the computer generated addresses with the predetermined addresses and provides a breakpoint, or interrupt signal. This method is generally expensive and requires a significant amount of printed circuit board space. Moreover, for high speed processors it does not react quickly enough to provide a "real time" breakpoint. A significant problem arises where microprocessor includes an address translation unit such as a memory management unit on the microprocessor itself. The only computer generated addresses accessible to a user are the physical addresses typically communicated to a random-access memory. That is, virtual addresses used by the programmer may not be available. It is difficult to set breakpoints based on physical addresses.
As will be seen, the present invention provides a breakpoint apparatus which solves the above problems, and moreover, provides enhanced breakpoint selection.